<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta charset="utf-8" />
    <title>后台管理 - 电工编辑</title>

    <meta name="keywords" content="{$Think.CONFIG.keywords}" />
    <meta name="description" content="{$Think.CONFIG.description}" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

    <include file="Public/head" />
</head>
<?php $Electrician='active';$ptitle='电工管理';$title='修改';?>
<body class="no-skin">
<include file="Public/header" />
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try{ace.settings.check('main-container' , 'fixed')}catch(e){}
    </script>

    <include file="Public/sidebar" />
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs" />

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set" />

                <!-- /section:settings.box -->
                <div class="row">
                    <div class="col-xs-12">
                        <form action="{:U('electrician_edit')}" method="post" class="ajax-form" enctype="multipart/form-data">
                            <input type="hidden" name="id" value="{$info['id']}">
                            <input type="hidden" name="p" value="{$p}">
                            <input type="hidden" name="is_check" value="{$is_check}">
                            <input type="hidden" name="search_content" value="{$search_content}">
                            <div class="form-horizontal">
                                <div class="form-group">
                                    <label class="col-sm-1 control-label no-padding-right" for="dealer_name"> 真实姓名 <span class="required">*</span> </label>
                                    <div class="col-sm-9">
                                        <input type="text" name='real_name' class="rcol-xs-10 col-sm-5" value="{$info['real_name']}" id="dealer_name" placeholder="真实姓名">
                                    </div>
                                </div>
                                <div class="space-4"></div>
                                <div class="form-group">
                                    <label class="col-sm-1 control-label no-padding-right" for="dealer_name"> 身份证号 <span class="required">*</span> </label>
                                    <div class="col-sm-9">
                                        <input type="text" name='id_number' value="{$info['id_number']}" class="rcol-xs-10 col-sm-5" placeholder="身份证号">
                                    </div>
                                </div>
                                <div class="space-4"></div>

                                <div class="form-group">
                                    <label class="col-sm-1 control-label no-padding-right"> 身份证正面 </label>
                                    <div class="col-sm-9">
                                        <div class="col-xs-10 col-sm-5">
                                            <input type="file" class="multi_img" name="identity_card_front">
                                            <img name='pic' src="__ROOT__{$info['identity_card_front']}" style="width:300px;padding-top:10px;">
                                        </div>
                                    </div>
                                </div>
                                <div class="space-4"></div><br>

                                <div class="form-group">
                                    <label class="col-sm-1 control-label no-padding-right"> 身份证反面 </label>
                                    <div class="col-sm-9">
                                        <div class="col-xs-10 col-sm-5"><input type="file" class="multi_img" name="identity_card_reverse">
                                            <img name='pic' src="__ROOT__{$info['identity_card_reverse']}" style="width:300px;padding-top:10px;">
                                        </div>
                                    </div>
                                </div>
                                <div class="space-4"></div><br>

                                <div class="form-group">
                                    <label class="col-sm-1 control-label no-padding-right"> 电工证正面 </label>
                                    <div class="col-sm-9">
                                        <div class="col-xs-10 col-sm-5"><input type="file" class="multi_img" name="electrician_license_front">
                                            <img name='pic' src="__ROOT__{$info['electrician_license_front']}" style="width:300px;padding-top:10px;">
                                        </div>
                                    </div>
                                </div>
                                <div class="space-4"></div><br>

                                <div class="form-group">
                                    <label class="col-sm-1 control-label no-padding-right"> 电工证反面 </label>
                                    <div class="col-sm-9">
                                        <div class="col-xs-10 col-sm-5"><input type="file" class="multi_img" name="electrician_license_reverse">
                                            <img name='pic' src="__ROOT__{$info['electrician_license_reverse']}" style="width:300px;padding-top:10px;">
                                        </div>
                                    </div>
                                </div>
                                <div class="space-4"></div>

                                <div class="form-group">
                                    <label class="col-sm-1 control-label no-padding-right" for="dealer_name"> 注册乡镇 <span class="required">*</span> </label>
                                    <div class="col-sm-9">
                                        <select  name="province" id="province" style="width:106px;margin-right:10px;" onchange="citys()" required>
                                            <option value="" >请选择省份</option>
                                            <volist name="province_list" id="v">
                                                <option value="{$v.code}" <if condition="$v['code'] eq $info['province']">selected</if>>{$v.name}</option>
                                            </volist>
                                        </select>

                                        <select  name="city" id="city" style="width:106px;margin-right:10px;" onchange="countys()" required>
                                            <option value="" >请选择城市</option>
                                            <volist name="city_list" id="v">
                                                <option value="{$v.code}" <if condition="$v['code'] eq $info['city']">selected</if>>{$v.name}</option>
                                            </volist>
                                        </select>

                                        <select  name="county" id="county" style="width:106px;margin-right:10px;" onchange="villages()" required>
                                            <option value="" >请选择县区</option>
                                            <volist name="county_list" id="v">
                                                <option value="{$v.code}" <if condition="$v['code'] eq $info['county']">selected</if>>{$v.name}</option>
                                            </volist>
                                        </select>

                                        <select  name="town" id="towns" style="width:106px;margin-right:10px;" required>
                                            <option value="" >请选择乡镇</option>
                                            <volist name="town_list" id="v">
                                                <option value="{$v.code}" <if condition="$v['code'] eq $info['town']">selected</if>>{$v.name}</option>
                                            </volist>
                                        </select>
                                    </div>
                                </div>
                                <div class="space-4"></div>

                                <div class="form-group">
                                    <label class="col-sm-1 control-label no-padding-right"> 审核状态 <span class="required">*</span> </label>
                                    <div class="col-sm-9">
                                        <select name="check_status" class="rcol-xs-10 col-sm-1" id="check_status">
                                            <option value="-1" <if condition="$info['check_status'] eq -1">selected</if>>未通过</option>
                                            <option value="0" <if condition="$info['check_status'] eq 0">selected</if>>待审核</option>
                                            <option value="1" <if condition="$info['check_status'] eq 1">selected</if>>已审核</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="space-4"></div>

                                <div class="col-md-offset-2 col-md-9">
                                    <button class="btn btn-info" type="submit">
                                        <i class="icon-ok bigger-110"></i>
                                        提交
                                    </button>

                                    &nbsp; &nbsp; &nbsp;
                                    <button class="btn btn-info" type="button" onclick='fan();'>
                                        <i class="icon-ok bigger-110"></i>
                                        返回
                                    </button>
                                </div>
                            </div>
                        </form>
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <include file="Public/footer" />

</div><!-- /.main-container -->

<include file="Public/footerjs" />
<!-- inline scripts related to this page -->
<script>
    //获取所有的城市
    function citys(){
        //获取被选中的option标签
        var province = $('#province option:selected').val();
        //ajax获取专题下的一级分类
        $.ajax({
            url:"{:U('city')}",
            type:'post',
            async: false,
            data:{province:province},
            success:function(data){
                var city = JSON.parse(data);
                var aa = '<option value="" >请选择城市</option>';
                for(var i=0;i<city.length;i++){
                    aa += '<option value="'+city[i].code+'">'+city[i].name+'</option>';
                }
                $('#city').html(aa);
            }
        })
    }

    //获取所有的县区
    function countys(){
        //获取被选中的option标签
        var city = $('#city option:selected').val();
        //ajax获取专题下的一级分类
        $.ajax({
            url:"{:U('county')}",
            type:'post',
            async: false,
            data:{city:city},
            success:function(data){
                var county = JSON.parse(data);
                var aa = '<option value="" >请选择县区</option>';
                for(var i=0;i<county.length;i++){
                    aa += '<option value="'+county[i].code+'">'+county[i].name+'</option>';
                    $('#county').html(aa);
                }
            }
        })
    }

    //获取所有的县区
    function villages(){
        //获取被选中的option标签
        var county = $('#county option:selected').val();
        //ajax获取专题下的一级分类
        $.ajax({
            url:"{:U('town')}",
            type:'post',
            async: false,
            data:{county:county},
            success:function(data){
                var county = JSON.parse(data);
                var aa = '<option value="" >请选择乡镇</option>';
                for(var i=0;i<county.length;i++){
                    aa += '<option value="'+county[i].code+'">'+county[i].name+'</option>';
                    $('#towns').html(aa);
                }
            }
        })
    }
</script>
</body>
</html>
